﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="LabourRelation.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.LabourRelation" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" />
<div class="moduleDivSlim1000x450">
    <table>
        <tr>
            <td>
                <asp:Panel runat="server" ID="pnlGridLabour">
                 <asp:LinkButton Font-Underline="False" Font-Weight="Bold" ID="AddNew" 
                             runat="server" onclick="AddNew_Click">
                                      <img style="border:0px;vertical-align:middle;" alt="" src="../Images/Buttons/AddRecord.gif" />&nbsp;&nbsp;เพิ่มข้อมูลใหม่
                </asp:LinkButton>
                <telerik:RadGrid ID="dgtGridLabour" runat="server" AllowAutomaticDeletes="True" 
                                        AllowFilteringByColumn="True" AllowMultiRowEdit="True" 
                                        AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True" 
                                        AutoGenerateColumns="False" EnableAJAX="True" EnableAJAXLoadingTemplate="True" 
                                        GridLines="None" Skin="Office2007" 
                                        GroupingSettings-GroupByFieldsSeparator="&nbsp;&nbsp;&nbsp;&nbsp;" 
                                        Width="970px" onitemcommand="dgtGridLabour_ItemCommand" 
                                        onneeddatasource="dgtGridLabour_NeedDataSource">
                     <MasterTableView AllowMultiColumnSorting="True" CellSpacing="-1" ClientDataKeyNames="upload_category_seq" CommandItemDisplay="Top" DataKeyNames="upload_category_seq" 
                        EditMode="PopUp" InsertItemPageIndexAction="ShowItemOnCurrentPage" NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                         <CommandItemTemplate>
                             
                         </CommandItemTemplate>
                         <Columns>
                             <telerik:GridBoundColumn HeaderText="PK"  UniqueName="upload_file_seq" DataField="upload_file_seq" Visible="false"></telerik:GridBoundColumn>
                             <telerik:GridBoundColumn UniqueName="upload_category_seq" DataField="upload_category_seq" Visible="false"></telerik:GridBoundColumn>
                              <telerik:GridBoundColumn UniqueName="file_path" DataField="file_path" Visible="false"></telerik:GridBoundColumn>
                             <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="GridEdit"
                                ConfirmDialogType="RadWindow" ConfirmText="แก้ไขข้อมูลใช่/ไม่?"
                                ImageUrl="../Images/Buttons/Edit.gif"
                                Text="คลิกเพื่อแก้ไขรายการ">
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                             </telerik:GridButtonColumn>
                             <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="GridDelete"
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลใช่/ไม่?"
                                ImageUrl="../Images/Buttons/Delete.gif"
                                Text="คลิกเพื่อแก้ไขรายการ">
                                <HeaderStyle HorizontalAlign="Center" Width="15px" />
                             </telerik:GridButtonColumn>
                             <telerik:GridBoundColumn HeaderText="ชื่อไฟล์" DataField="file_name" UniqueName="file_name"
                                 ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                <HeaderStyle Width="30%" />
                             </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn HeaderText="หมวดหมู่" DataField="category_name" UniqueName="category_name"
                                 ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                 <HeaderStyle Width="30%" />
                             </telerik:GridBoundColumn>
                             <telerik:GridBoundColumn HeaderText="หมายเหตุ" DataField="remark" UniqueName="remark"
                                 ShowFilterIcon="false" CurrentFilterFunction="Contains" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                             </telerik:GridBoundColumn>
                             <telerik:GridButtonColumn HeaderText="ดาวโหลดไฟล์" ButtonType="ImageButton" CommandName="download_file" 
                                ConfirmDialogType="RadWindow" ConfirmText="ดาวโหลดไฟล์" ItemStyle-Width="15"
                                ImageUrl="../Images/Buttons/Download.png">
                                <HeaderStyle HorizontalAlign="Center" Width="15%" />
                             </telerik:GridButtonColumn>
                         </Columns>
                     </MasterTableView>
                </telerik:RadGrid>
                </asp:Panel>
            </td>
        </tr>
        <tr align="center">
            <td>
             <asp:Label runat="server" ID="lblUploadSeq" Visible="False"></asp:Label>
             <asp:Label runat="server" ID="lblCategory" Visible="False"></asp:Label>
             <asp:Panel ID="pnlGridLabourAdd" runat="server">
                <table>
                    <tr>
                        <td>ประเภทไฟล์ : </td>
                        <td align="left">
                            <telerik:RadComboBox ID="cboCategory" runat="server" DataValueField="upload_category_seq"
                                            DataTextField="category_name"  Filter="Contains"
                                            HighlightTemplatedItems="true">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td>ตั้งชื่อไฟล์ : </td>
                        <td align="left">
                            <asp:TextBox ID="txtFileName" runat="server" Width="180px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                      <td>อัพโหลดไฟล์ : </td>
                      <td align="left">
                          <asp:FileUpload ID="FileUpload" runat="server" Width="350px" /> &nbsp;&nbsp; ขนาดไฟล์ต้องไม่เกิน 100 MB
                      </td>
                    </tr>
                    <tr>
                        <td>หมายเหตุ : </td>
                        <td colspan="2" align="left">
                            <asp:TextBox runat="server" ID="txtRemark" TextMode="MultiLine"
                             Width="450px" Height="90px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <asp:Button ID="btnSubmit" runat="server" Text="อัพโหลด" 
                              onclick="btnSubmit_Click"></asp:Button> &nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnUpdate" runat="server" Text="อัพโหลด" 
                                onclick="btnUpdate_Click"></asp:Button> &nbsp;&nbsp;&nbsp;
                            <asp:Button ID="btnCancle" runat="server" Text="ยกเลิก" 
                                onclick="btnCancle_Click"></asp:Button>
                        </td>
                    </tr>
                    <%-- <asp:Panel runat="server" ID="lblTextLoad">
                    <tr>
                        <td>ไฟล์ที่อัพโหลด : </td>
                        <td align="left">
                            <asp:Label runat="server" ID="lblText"></asp:Label>
                        </td>
                    </tr>
                   </asp:Panel>--%>
                </table>
              </asp:Panel>
            </td>
         </tr>
    </table>
  </div>
</asp:Content>
